// 滚动通知栏
const componentBehavior = require('../../../behaviors/component');
const { COMPONENT_OPTIONS } = require('../../../constants/common');

Component({
    behaviors: [componentBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        // 提示数据
        list: {
            type: Array,
            value: [],
        },
        // 是否是垂直方向
        vertical: {
            type: Boolean,
            value: true, // 默认垂直滚动
        },
        // 宽度
        width: {
            type: String,
            value: '522rpx',
        },
        // 间隔时间，默认：5秒
        interval: {
            type: Number,
            value: 5000,
        },
        // 是否展示时间
        showTime: {
            type: Boolean,
            value: true,
        },
    },
    methods: {
        clickAction: function () {
            this.triggerEvent('click');
        },
    }
})
